package com.springboot.security.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * @Author: TongRui乀
 * @Date: 2020-03-19 13:11
 * @description：
 */
@RestController
@RequestMapping("user")
public class UserController {


    @GetMapping(value = "info")
    public Principal me(Principal principal) {
        System.out.println("调用me接口获取用户信息：" + principal);
        return principal;
    }
}
